<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ContactController
 *
 * @author jozin
 */

namespace Acme\MainBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Acme\MainBundle\Entity\Pouzivatel;
use Symfony\Component\HttpFoundation\Response;

class ContactController extends Controller {
    
    public function indexAction() 
    {
        $user = new Pouzivatel();
        $user->setMeno("jarov");
        
        $validator = $this->get('validator');
        $errors = $validator->validate($user);

        if (count($errors) > 0) {
            return new Response(print_r($errors, true));
        } else {
            return new Response('The author is valid! Yes!');
        }
              
        
        //return $this->redirect($this->generateUrl('acme_main_homepage'));
    }
}

?>
